/*
 * @Author: wangyongcun@persagy.com
 * @Date: 2025-03-08 15:55:07
 * @LastEditTime: 2025-03-21 17:41:46
 * @FilePath: \vite-admin\src\router\guard\title.ts
 * @Description: 添加title标题
 *
 */
import appSetting from "@/appSetting";
const { title: appTitle } = appSetting;
export function createDocumentTitleGuard(router: Router) {
  router.afterEach((to: any) => {
    const { title } = to.meta;
    useTitle(title ? title + '-' + appTitle : appTitle);
  });
}
